 /*序列化表单*/
 $.fn.serializeObject = function() {
     var o = {};
     var a = this.serializeArray();
     $.each(a, function() {
         if (o[this.name] !== undefined) {
             if (!o[this.name].push) {
                 o[this.name] = [o[this.name]];
             }
             o[this.name].push(this.value || '');
         } else {
             o[this.name] = this.value || '';
         }
     });
     return o;
 };

 /*校验扩展*/
 //扩展easyui表单的验证  
 $.extend($.fn.validatebox.defaults.rules, {
     //验证汉字  
     CHS: {
         validator: function(value) {
             return /^[\u0391-\uFFE5]+$/.test(value);
         },
         message: '请输入汉字'
     },
     //移动手机号码验证  
     Mobile: { //value值为文本框中的值  
         validator: function(value) {
             var reg = /^1[3|4|5|8|9]\d{9}$/;
             return reg.test(value);
         },
         message: '请正确的输入手机号码'
     },
     //国内邮编验证  
     ZipCode: {
         validator: function(value) {
             var reg = /^[0-9]\d{5}$/;
             return reg.test(value);
         },
         message: 'The zip code must be 6 digits and 0 began.'
     },
     //数字  
     Number: {
         validator: function(value) {
             var reg = /^[0-9]*$/;
             return reg.test(value);
         },
         message: '请输入数字'
     },
     BankNo: {
         validator: function(value) {
             var reg = /^\d{16}|\d{19}$/
             return reg.test(value);
         },
         message: '请正确的输入银行卡号'
     },
     YYYYMM: {
         validator: function(value) {
             var reg = /^\d{6}$/
             return reg.test(value);
         },
         message: '请正确的输入年月'
     }
 })